angular.module('liveingModule', ['ionic'])
	.controller('liveCtrl', function($scope,live,$state) {
		$scope.router=$state.params;
		live.getHomeData()
			.then(function(data) {
				console.log(data.data.data.body)
				$scope.bigIamge=data.data.data
			})
	})
	.factory('live', function($http,$state) {
		console.log($state.params.mediaId)
		var getHomeData = function() {
//		https://ichuanyi.com/m.php?mediaId=1458828003&method=media.getMedia&pageSize=20&page=1&isFromApp=NaN&isICYPage=false
			return $http.get("/icy/m.php?method=media.getMedia&pageSize=20&page=1&isFromApp=NaN&isICYPage=false",{
				params:{
					mediaId:$state.params.mediaId
				}
			})
				.then(function(data) {
					return data;
				});
		};

		return {
			getHomeData: getHomeData
		};
	})